<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    function fun1() {
        console.log("fun1");
    }

    var fun2 = function() {
        console.log("fun2");
    }
    fun1();
    fun2();

    //立即执行函数
    (function fun3() {
        console.log("fun3");
    })();

    var fun4 = function() {
        console.log("fun4");
    }();


    //匿名函数-->立即执行
    +

    function() {
        console.log("fun5");
    }(); 

    -function() {
        console.log("fun5");
    }();
    ~ function() {
        console.log("fun5");
    }();
    ! function() {
        console.log("fun5");
    }();
    (function() {
        console.log("fun5");
    })();
</script>

</html>